import platform

SConscriptChdir(0)

env = Environment(
	# GCC flags for building libchipmunk
	CCFLAGS = ['-std=gnu99', '-O3', '-ffast-math', '-Wall'],
	CPPPATH = ['../include/chipmunk']
)

if(platform.system() == "Darwin"):
	env.Append(
		CCFLAGS = ['-arch', 'ppc', '-arch', 'i386'],
		LINKFLAGS = ['-arch', 'ppc', '-arch', 'i386'],
	)

src = [
	Glob('*.c'),
	Glob('constraints/*.c'),
]

static_lib = env.StaticLibrary(
	'../chipmunk', 
	src,
)

Default(static_lib)
